//
//  UIView+WWExtension.m
//  WWLottery
//
//  Created by 张湾湾 on 16/5/28.
//  Copyright © 2016年 张湾湾. All rights reserved.
//

#import "UIView+WWExtension.h"

@implementation UIView (WWExtension)

- (void)setWW_Size:(CGSize)WW_Size
{
    CGRect frame = self.frame;
    frame.size = WW_Size;
    self.frame = frame;
}

- (CGSize)WW_Size
{
    return self.frame.size;
}
- (void)setWW_Origin:(CGPoint)WW_Origin
{
    CGRect frame = self.frame;
    frame.origin = WW_Origin;
    self.frame = frame;
}

- (CGPoint)WW_Origin
{
    return self.frame.origin;
}
- (void)setWW_X:(CGFloat)WW_X
{
    CGRect frame = self.frame;
    frame.origin.x = WW_X;
    self.frame = frame;
}

- (CGFloat)WW_X
{
    return self.WW_Origin.x;
}

- (void)setWW_Y:(CGFloat)WW_Y
{
    CGRect frame = self.frame;
    frame.origin.y = WW_Y;
    self.frame = frame;
}

- (CGFloat)WW_Y
{
    return self.WW_Origin.y;
}
- (void)setWW_Width:(CGFloat)WW_Width
{
    CGRect frame = self.frame;
    frame.size.width = WW_Width;
    self.frame = frame;
}
- (CGFloat)WW_Width
{
    return self.WW_Size.width;
}

- (void)setWW_Height:(CGFloat)WW_Height
{
    CGRect frame = self.frame;
    frame.size.height = WW_Height;
    self.frame = frame;
}
- (CGFloat)WW_Height
{
    return self.WW_Size.height;
}
- (void)setWW_CenterX:(CGFloat)WW_CenterX
{
    CGPoint point = self.center;
    point.x = WW_CenterX;
    self.center = point;
}
- (CGFloat)WW_CenterX
{
    return self.center.x;
}
- (void)setWW_CenterY:(CGFloat)WW_CenterY
{
    CGPoint point = self.center;
    point.y = WW_CenterY;
    self.center = point;
}
- (CGFloat)WW_CenterY
{
    return self.center.y;
}

@end
